import Vue from "vue"
import VueRouter from "vue-router"
import discover from "@/pages/discover"
import friend from "@/pages/friend"
// import mine from "@/mine"

Vue.use(VueRouter)
let routes =[
    {
        path:"/",
        component:()=>import("@/pages/carPage"),   
    },
    {
    path:"/discover",
    component:discover,
    children:[
        {
            //children中的选项path最前面不能加斜杆
            path:"playlist",
            component:()=>import('@/pages/discover/palylist')
        },{
            path:'djradio',
            component:()=>import('@/pages/discover/djradio')
        }
    ]
},

{
    path:"/friend/:id",
    component:friend
},
{
    path:"/mine",
    component:()=>import(/*webpackChunkName:'mine'*/"@/pages/mine"),
},
{
    path:'/list',
    component:()=>import("@/pages/list")
},
{
    path:"/detail/:productid",
    component:()=>import("@/pages/detail")
},
{
    path:"*",
    component:()=>import("@/pages/fei")
}
];

let router =new VueRouter({

    routes
})
export default router

